JS二级菜单``大侠给个代码

来源:百度知道 编辑:UC知道 时间:2024/05/24 15:55:38
我想做一个二级关联下拉菜单,一级的值为:
运动
音乐
游戏
影视
模型
动漫
阅读
热点话题宠物

二级的值为:
球类运动","非球类运动","其他
流行乐","非流行乐","其他"
网络游戏","单机游戏","其他"
"电影","电视剧","其他"
"动漫模型","电影模型","其他"
"动画","漫画","其他")
"书籍","报纸","杂志","其他"
"恶搞类","时尚类","其他"
"有生命宠物","其他"

一级的一行对应二级的一行,有哪位大哥能给点源代码的,小弟感激不尽

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style>
body,select
{
font-size:9pt;
font-family:Verdana;
}
a
{
color:red;
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
</style>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Dsy()
{
this.Items = {};
}
Dsy.prototype.add = function(id,iArray)
{
this.Items[id] = iArray;
}
Dsy.prototype.Exists = function(id)
{
if(typeof(this.Items[id]) == "undefined") return false;
return true;
}

function change(v){
var str="0";
for(i=0;i<v;i++){ str+=("_"+(document.getElementById(s[i]).selectedIndex-1));};
var ss=document.getElementById(s[v]);